package com.zhuangjie.shop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商家/商店
 * </p>
 *
 * @author zhuangjie
 * @since 2023-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("shop")
@ApiModel(value="Shop对象", description="商家/商店")
public class Shop implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "店铺id")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "店铺类型_门店类型id")
    @TableField("shop_category_id")
    private Long shopCategoryId;

    @ApiModelProperty(value = "店铺名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "手机号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "经度")
    @TableField("longitude")
    private Double longitude;

    @ApiModelProperty(value = "纬度")
    @TableField("latitude")
    private Double latitude;

    @ApiModelProperty(value = "店铺logo")
    @TableField("logo")
    private String logo;

    @ApiModelProperty(value = "背景海报/店内环境图片")
    @TableField("background_poster")
    private String backgroundPoster;

    @ApiModelProperty(value = "店铺公告")
    @TableField("notice")
    private String notice;

    @ApiModelProperty(value = "口号（flags）,每个flag间逗号隔开")
    @TableField("flags")
    private String flags;

    @ApiModelProperty(value = "名声牌子（1-品牌id,2-优选id）")
    @TableField("reputation")
    private String reputation;

    @ApiModelProperty(value = "经营类型(1支持配送、2支持店食、3、支持自提）可多选逗号隔开,单项叫receivingMethod")
    @TableField("business_type")
    private String businessType;

    @ApiModelProperty(value = "配送方式（1平台配送，2商家配送）")
    @TableField("delivery_method")
    private Short deliveryMethod;

    @ApiModelProperty(value = "店铺状态（0未入驻、1已入驻、-1冻结中）")
    @TableField("account_status")
    private Short accountStatus;

    @ApiModelProperty(value = "店铺营业状态（1营业中，0已打烊/休息中）")
    @TableField("business_status")
    private Short businessStatus;

    @ApiModelProperty(value = "最低起送")
    @TableField("minimum_delivery_amount")
    private BigDecimal minimumDeliveryAmount;

    @ApiModelProperty(value = "餐盒费用")
    @TableField("packing_fee")
    private BigDecimal packingFee;

    @ApiModelProperty(value = "经营范围（公里）")
    @TableField("business_scope")
    private Double businessScope;

    @ApiModelProperty(value = "省份编码")
    @TableField("province_code")
    private String provinceCode;

    @ApiModelProperty(value = "省份名称")
    @TableField("province_name")
    private String provinceName;

    @ApiModelProperty(value = "城市编码")
    @TableField("city_code")
    private String cityCode;

    @ApiModelProperty(value = "城市名称")
    @TableField("city_name")
    private String cityName;

    @ApiModelProperty(value = "区县编码")
    @TableField("district_code")
    private String districtCode;

    @ApiModelProperty(value = "区县名称")
    @TableField("district_name")
    private String districtName;

    @ApiModelProperty(value = "具体地址描述")
    @TableField("address_describe")
    private String addressDescribe;

    @ApiModelProperty(value = "每公里配送所需时间（分钟）")
    @TableField("delivery_time_per_km")
    private Integer deliveryTimePerKm;

    @ApiModelProperty(value = "制作餐食所需时间（分钟）")
    @TableField("make_time")
    private Integer makeTime;

    @ApiModelProperty(value = "允许提前预定的天数(-1，表示不允许预定，既然是今天，0是今天，1明天，..)")
    @TableField("advance_booking_days")
    private Integer advanceBookingDays ;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "商家保障配送费不超过的费用，超过的部分（从商家单中扣除给外卖员）")
    @TableField(value = "delivery_fee")
    private BigDecimal deliveryFee;

    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;


}
